home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / Tool Chest / Development Tools & Languages / Dylan Related / Marlais / Marlais 0.5.9-portable sources / gc / config.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-15  |  18.7 KB  |  648 lines  |  [TEXT/ttxt]

  1. /* 
  2.  * Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
  3.  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  4.  *
  5.  * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
  6.  * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
  7.  *
  8.  * Permission is hereby granted to use or copy this program
  9.  * for any purpose,  provided the above notices are retained on all copies.
  10.  * Permission to modify the code and to distribute modified code is granted,
  11.  * provided the above notices are retained, and a notice that the code was
  12.  * modified is included with the above copyright notice.
  13.  */
  14. /* Boehm, February 6, 1995 5:24 pm PST */
  15.  
  16. #ifndef CONFIG_H
  17.  
  18. # define CONFIG_H
  19.  
  20. /* Machine dependent parameters.  Some tuning parameters can be found    */
  21. /* near the top of gc_private.h.                    */
  22.  
  23. /* Machine specific parts contributed by various people.  See README file. */
  24.  
  25. /* Determine the machine type: */
  26. # if defined(sun) && defined(mc68000)
  27. #    define M68K
  28. #    define SUNOS4
  29. #    define mach_type_known
  30. # endif
  31. # if defined(hp9000s300)
  32. #    define M68K
  33. #    define HP
  34. #    define mach_type_known
  35. # endif
  36. # if defined(vax)
  37. #    define VAX
  38. #    ifdef ultrix
  39. #    define ULTRIX
  40. #    else
  41. #    define BSD
  42. #    endif
  43. #    define mach_type_known
  44. # endif
  45. # if defined(mips) || defined(__mips)
  46. #    define MIPS
  47. #    if defined(ultrix) || defined(__ultrix)
  48. #    define ULTRIX
  49. #    else
  50. #    ifdef _SYSTYPE_SVR4
  51. #      define IRIX5
  52. #    else
  53. #      define RISCOS  /* or IRIX 4.X */
  54. #    endif
  55. #    endif
  56. #    define mach_type_known
  57. # endif
  58. # if defined(sequent) && defined(i386)
  59. #    define I386
  60. #    define SEQUENT
  61. #    define mach_type_known
  62. # endif
  63. # if defined(sun) && defined(i386)
  64. #    define I386
  65. #    define SUNOS5
  66. #    define mach_type_known
  67. # endif
  68. # if (defined(__OS2__) || defined(__EMX__)) && defined(__32BIT__)
  69. #    define I386
  70. #    define OS2
  71. #    define mach_type_known
  72. # endif
  73. # if defined(ibm032)
  74. #   define RT
  75. #   define mach_type_known
  76. # endif
  77. # if defined(sun) && defined(sparc)
  78. #   define SPARC
  79.     /* Test for SunOS 5.x */
  80. #     include <errno.h>
  81. #     ifdef ECHRNG
  82. #       define SUNOS5
  83. #     else
  84. #    define SUNOS4
  85. #     endif
  86. #   define mach_type_known
  87. # endif
  88. # if defined(sparc) && defined(unix) && !defined(sun)
  89. #   define SPARC
  90. #   define DRSNX
  91. #   define mach_type_known
  92. # endif
  93. # if defined(_IBMR2)
  94. #   define RS6000
  95. #   define mach_type_known
  96. # endif
  97. # if defined(_M_XENIX) && defined(_M_SYSV) && defined(_M_I386)
  98.     /* The above test may need refinement    */
  99. #   define I386
  100. #   define SCO
  101. #   define mach_type_known
  102. # endif
  103. # if defined(_AUX_SOURCE)
  104. #   define M68K
  105. #   define SYSV
  106. #   define mach_type_known
  107. # endif
  108. # if defined(_PA_RISC1_0) || defined(_PA_RISC1_1)
  109. #   define HP_PA
  110. #   define mach_type_known
  111. # endif
  112. # if defined(linux) && defined(i386)
  113. #    define I386
  114. #    define LINUX
  115. #    define mach_type_known
  116. # endif
  117. # if defined(__alpha)
  118. #   define ALPHA
  119. #   define mach_type_known
  120. # endif
  121. # if defined(_AMIGA)
  122. #   define M68K
  123. #   define AMIGA
  124. #   define mach_type_known
  125. # endif
  126. # if defined(THINK_C) || defined(__MWERKS__) && !defined(__powerc)
  127. #   define M68K
  128. #   define MACOS
  129. #   define mach_type_known
  130. # endif
  131. # if defined(__MWERKS__) && defined(__powerc)
  132. #   define POWERPC
  133. #   define MACOS
  134. #   define mach_type_known
  135. # endif
  136. # if defined(NeXT) && defined(mc68000)
  137. #   define M68K
  138. #   define NEXT
  139. #   define mach_type_known
  140. # endif
  141. # if defined(NeXT) && defined(i386)
  142. #   define I386
  143. #   define NEXT
  144. #   define mach_type_known
  145. # endif
  146. # if defined(__FreeBSD__) && defined(i386)
  147. #   define I386
  148. #   define FREEBSD
  149. #   define mach_type_known
  150. # endif
  151. # if defined(__NetBSD__) && defined(i386)
  152. #   define I386
  153. #   define NETBSD
  154. #   define mach_type_known
  155. # endif
  156. # if defined(bsdi) && defined(i386)
  157. #    define I386
  158. #    define BSDI
  159. #    define mach_type_known
  160. # endif
  161. # if !defined(mach_type_known) && defined(__386BSD__)
  162. #   define I386
  163. #   define THREE86BSD
  164. #   define mach_type_known
  165. # endif
  166. # if defined(_CX_UX) && defined(_M88K)
  167. #   define M88K
  168. #   define CX_UX
  169. #   define mach_type_known
  170. # endif
  171. # if defined(DGUX)
  172. #   define M88K
  173.     /* DGUX defined */
  174. #   define mach_type_known
  175. # endif
  176. # if defined(_MSDOS) && (_M_IX86 == 300) || (_M_IX86 == 400)
  177. #   define I386
  178. #   define MSWIN32    /* or Win32s */
  179. #   define mach_type_known
  180. # endif
  181. # if defined(__BORLANDC__)
  182. #   define I386
  183. #   define MSWIN32
  184. #   define mach_type_known
  185. # endif
  186.  
  187. /* Feel free to add more clauses here */
  188.  
  189. /* Or manually define the machine type here.  A machine type is     */
  190. /* characterized by the architecture.  Some                */
  191. /* machine types are further subdivided by OS.                */
  192. /* the macros ULTRIX, RISCOS, and BSD to distinguish.            */
  193. /* Note that SGI IRIX is treated identically to RISCOS.            */
  194. /* SYSV on an M68K actually means A/UX.                    */
  195. /* The distinction in these cases is usually the stack starting address */
  196. # ifndef mach_type_known
  197.     --> unknown machine type
  198. # endif
  199.             /* Mapping is: M68K       ==> Motorola 680X0    */
  200.             /*           (SUNOS4,HP,NEXT, and SYSV (A/UX),    */
  201.             /*           MACOS and AMIGA variants)        */
  202.             /*             I386       ==> Intel 386         */
  203.             /*            (SEQUENT, OS2, SCO, LINUX, NETBSD,    */
  204.             /*             FREEBSD, THREE86BSD, MSWIN32,    */
  205.             /*              BSDI, SUNOS5, NEXT    variants)    */
  206.                     /*             NS32K      ==> Encore Multimax     */
  207.                     /*             MIPS       ==> R2000 or R3000    */
  208.                     /*            (RISCOS, ULTRIX variants)    */
  209.                     /*           VAX          ==> DEC VAX        */
  210.                     /*            (BSD, ULTRIX variants)        */
  211.                     /*           RS6000     ==> IBM RS/6000 AIX3.X    */
  212.                     /*           RT          ==> IBM PC/RT        */
  213.                     /*           HP_PA      ==> HP9000/700 & /800    */
  214.                     /*                  HP/UX            */
  215.             /*           SPARC      ==> SPARC under SunOS    */
  216.             /*            (SUNOS4, SUNOS5,        */
  217.             /*             DRSNX variants)        */
  218.             /*            ALPHA      ==> DEC Alpha OSF/1    */
  219.             /*            M88K       ==> Motorola 88XX0        */
  220.             /*                 (CX_UX and DGUX)        */
  221.  
  222.  
  223. /*
  224.  * For each architecture and OS, the following need to be defined:
  225.  *
  226.  * CPP_WORD_SZ is a simple integer constant representing the word size.
  227.  * in bits.  We assume byte addressibility, where a byte has 8 bits.
  228.  * We also assume CPP_WORD_SZ is either 32 or 64.
  229.  * (We care about the length of pointers, not hardware
  230.  * bus widths.  Thus a 64 bit processor with a C compiler that uses
  231.  * 32 bit pointers should use CPP_WORD_SZ of 32, not 64. Default is 32.)
  232.  *
  233.  * MACH_TYPE is a string representation of the machine type.
  234.  * OS_TYPE is analogous for the OS.
  235.  *
  236.  * ALIGNMENT is the largest N, such that
  237.  * all pointer are guaranteed to be aligned on N byte boundaries.
  238.  * defining it to be 1 will always work, but perform poorly.
  239.  *
  240.  * DATASTART is the beginning of the data segment.
  241.  * On UNIX systems, the collector will scan the area between DATASTART
  242.  * and &end for root pointers.
  243.  *
  244.  * STACKBOTTOM is the cool end of the stack, which is usually the
  245.  * highest address in the stack.
  246.  * Under PCR or OS/2, we have other ways of finding thread stacks.
  247.  * For each machine, the following should:
  248.  * 1) define STACK_GROWS_UP if the stack grows toward higher addresses, and
  249.  * 2) define exactly one of
  250.  *    STACKBOTTOM (should be defined to be an expression)
  251.  *    HEURISTIC1
  252.  *    HEURISTIC2
  253.  * If either of the last two macros are defined, then STACKBOTTOM is computed
  254.  * during collector startup using one of the following two heuristics:
  255.  * HEURISTIC1:  Take an address inside GC_init's frame, and round it up to
  256.  *        the next multiple of STACK_GRAN.
  257.  * HEURISTIC2:  Take an address inside GC_init's frame, increment it repeatedly
  258.  *        in small steps (decrement if STACK_GROWS_UP), and read the value
  259.  *        at each location.  Remember the value when the first
  260.  *        Segmentation violation or Bus error is signalled.  Round that
  261.  *        to the nearest plausible page boundary, and use that instead
  262.  *        of STACKBOTTOM.
  263.  *
  264.  * If no expression for STACKBOTTOM can be found, and neither of the above
  265.  * heuristics are usable, the collector can still be used with all of the above
  266.  * undefined, provided one of the following is done:
  267.  * 1) GC_mark_roots can be changed to somehow mark from the correct stack(s)
  268.  *    without reference to STACKBOTTOM.  This is appropriate for use in
  269.  *    conjunction with thread packages, since there will be multiple stacks.
  270.  *    (Allocating thread stacks in the heap, and treating them as ordinary
  271.  *    heap data objects is also possible as a last resort.  However, this is
  272.  *    likely to introduce significant amounts of excess storage retention
  273.  *    unless the dead parts of the thread stacks are periodically cleared.)
  274.  * 2) Client code may set GC_stackbottom before calling any GC_ routines.
  275.  *    If the author of the client code controls the main program, this is
  276.  *    easily accomplished by introducing a new main program, setting
  277.  *    GC_stackbottom to the address of a local variable, and then calling
  278.  *    the original main program.  The new main program would read something
  279.  *    like:
  280.  *
  281.  *        # include "gc_private.h"
  282.  *
  283.  *        main(argc, argv, envp)
  284.  *        int argc;
  285.  *        char **argv, **envp;
  286.  *        {
  287.  *            int dummy;
  288.  *
  289.  *            GC_stackbottom = (ptr_t)(&dummy);
  290.  *            return(real_main(argc, argv, envp));
  291.  *        }
  292.  *
  293.  *
  294.  * Each architecture may also define the style of virtual dirty bit
  295.  * implementation to be used:
  296.  *   MPROTECT_VDB: Write protect the heap and catch faults.
  297.  *   PROC_VDB: Use the SVR4 /proc primitives to read dirty bits.
  298.  *
  299.  * An architecture may define DYNAMIC_LOADING if dynamic_load.c
  300.  * defined GC_register_dynamic_libraries() for the architecture.
  301.  */
  302.  
  303.  
  304. # define STACK_GRAN 0x1000000
  305. # ifdef M68K
  306. #   define MACH_TYPE "M68K"
  307. #   define ALIGNMENT 2
  308. #   ifdef SUNOS4
  309. #    define OS_TYPE "SUNOS4"
  310.     extern char etext;
  311. #    define DATASTART ((ptr_t)((((word) (&etext)) + 0x1ffff) & ~0x1ffff))
  312. #    define HEURISTIC1    /* differs    */
  313. #    define DYNAMIC_LOADING
  314. #   endif
  315. #   ifdef HP
  316. #    define OS_TYPE "HP"
  317.     extern char etext;
  318. #       define DATASTART ((ptr_t)((((word) (&etext)) + 0xfff) & ~0xfff))
  319. #       define STACKBOTTOM ((ptr_t) 0xffeffffc)
  320.                   /* empirically determined.  seems to work. */
  321. #   endif
  322. #   ifdef SYSV
  323. #    define OS_TYPE "SYSV"
  324.     extern etext;
  325. #       define DATASTART ((ptr_t)((((word) (&etext)) + 0x3fffff) \
  326.                    & ~0x3fffff) \
  327.                   +((word)&etext & 0x1fff))
  328.     /* This only works for shared-text binaries with magic number 0413.
  329.        The other sorts of SysV binaries put the data at the end of the text,
  330.        in which case the default of &etext would work.  Unfortunately,
  331.        handling both would require having the magic-number available.
  332.                       -- Parag
  333.        */
  334. #    define STACKBOTTOM ((ptr_t)0xFFFFFFFE)
  335.             /* The stack starts at the top of memory, but   */
  336.             /* 0x0 cannot be used as setjump_test complains */
  337.             /* that the stack direction is incorrect.  Two  */
  338.             /* bytes down from 0x0 should be safe enough.   */
  339.             /*         --Parag                */
  340. #   endif
  341. #   ifdef AMIGA
  342. #    define OS_TYPE "AMIGA"
  343.              /* STACKBOTTOM and DATASTART handled specially    */
  344.              /* in os_dep.c                    */
  345. #   endif
  346. #   ifdef MACOS
  347. #     ifndef __LOWMEM__
  348. #     include <LowMem.h>
  349. #     endif
  350. #     define OS_TYPE "MACOS"
  351.             /* see os_dep.c for details of global data segments. */
  352. #     define STACKBOTTOM ((ptr_t) LMGetCurStackBase())
  353. #   endif
  354. #   ifdef NEXT
  355. #    define OS_TYPE "NEXT"
  356. #    define DATASTART ((ptr_t) get_etext())
  357. #    define STACKBOTTOM ((ptr_t) 0x4000000)
  358. #   endif
  359. # endif
  360.  
  361. # ifdef POWERPC
  362. #   define MACH_TYPE "POWERPC"
  363. #   define ALIGNMENT 2
  364. #   ifdef MACOS
  365. #     ifndef __LOWMEM__
  366. #     include <LowMem.h>
  367. #     endif
  368. #     define OS_TYPE "MACOS"
  369.             /* see os_dep.c for details of global data segments. */
  370. #     define STACKBOTTOM ((ptr_t) LMGetCurStackBase())
  371. #   endif
  372. # endif
  373.  
  374. # ifdef VAX
  375. #   define MACH_TYPE "VAX"
  376. #   define ALIGNMENT 4    /* Pointers are longword aligned by 4.2 C compiler */
  377.     extern char etext;
  378. #   define DATASTART ((ptr_t)(&etext))
  379. #   ifdef BSD
  380. #    define OS_TYPE "BSD"
  381. #    define HEURISTIC1
  382.             /* HEURISTIC2 may be OK, but it's hard to test. */
  383. #   endif
  384. #   ifdef ULTRIX
  385. #    define OS_TYPE "ULTRIX"
  386. #    define STACKBOTTOM ((ptr_t) 0x7fffc800)
  387. #   endif
  388. # endif
  389.  
  390. # ifdef RT
  391. #   define MACH_TYPE "RT"
  392. #   define ALIGNMENT 4
  393. #   define DATASTART ((ptr_t) 0x10000000)
  394. #   define STACKBOTTOM ((ptr_t) 0x1fffd800)
  395. # endif
  396.  
  397. # ifdef SPARC
  398. #   define MACH_TYPE "SPARC"
  399. #   define ALIGNMENT 4    /* Required by hardware    */
  400.     extern int etext;
  401. #   ifdef SUNOS5
  402. #    define OS_TYPE "SUNOS5"
  403.     extern int etext;
  404.     extern char * GC_SysVGetDataStart();
  405. #       define DATASTART (ptr_t)GC_SysVGetDataStart(0x10000, &etext)
  406. #    define PROC_VDB
  407. #    define HEURISTIC1
  408. #   endif
  409. #   ifdef SUNOS4
  410. #    define OS_TYPE "SUNOS4"
  411.     /* [If you have a weak stomach, don't read this.]        */
  412.     /* We would like to use:                    */
  413. /* #       define DATASTART ((ptr_t)((((word) (&etext)) + 0x1fff) & ~0x1fff)) */
  414.     /* This fails occasionally, due to an ancient, but very     */
  415.     /* persistent ld bug.  &etext is set 32 bytes too high.        */
  416.     /* We instead read the text segment size from the a.out        */
  417.     /* header, which happens to be mapped into our address space    */
  418.     /* at the start of the text segment.  The detective work here    */
  419.     /* was done by Robert Ehrlich, Manuel Serrano, and Bernard    */
  420.     /* Serpette of INRIA.                        */
  421.     /* This assumes ZMAGIC, i.e. demand-loadable executables.    */
  422. #       define DATASTART ((ptr_t)(*(int *)0x2004+0x2000))
  423. #    define MPROTECT_VDB
  424. #    define HEURISTIC1
  425. #   endif
  426. #   ifdef DRSNX
  427. #       define CPP_WORDSZ 32
  428. #    define OS_TYPE "DRSNX"
  429.     extern char * GC_SysVGetDataStart();
  430.     extern int etext;
  431. #       define DATASTART (ptr_t)GC_SysVGetDataStart(0x10000, &etext)
  432. #    define MPROTECT_VDB
  433. #       define STACKBOTTOM ((ptr_t) 0xdfff0000)
  434. #   endif
  435. #   define DYNAMIC_LOADING
  436. # endif
  437.  
  438. # ifdef I386
  439. #   define MACH_TYPE "I386"
  440. #   define ALIGNMENT 4    /* Appears to hold for all "32 bit" compilers    */
  441.             /* except Borland.  The -a4 option fixes     */
  442.             /* Borland.                    */
  443. #   ifdef SEQUENT
  444. #    define OS_TYPE "SEQUENT"
  445.     extern int etext;
  446. #       define DATASTART ((ptr_t)((((word) (&etext)) + 0xfff) & ~0xfff))
  447. #       define STACKBOTTOM ((ptr_t) 0x3ffff000) 
  448. #   endif
  449. #   ifdef SUNOS5
  450. #    define OS_TYPE "SUNOS5"
  451.       extern int etext, _start;
  452.       extern char * GC_SysVGetDataStart();
  453. #       define DATASTART GC_SysVGetDataStart(0x1000, &etext)
  454. #    define STACKBOTTOM ((ptr_t)(&_start))
  455. #    define PROC_VDB
  456. #   endif
  457. #   ifdef SCO
  458. #    define OS_TYPE "SCO"
  459.     extern int etext;
  460. #       define DATASTART ((ptr_t)((((word) (&etext)) + 0x3fffff) \
  461.                   & ~0x3fffff) \
  462.                  +((word)&etext & 0xfff))
  463. #    define STACKBOTTOM ((ptr_t) 0x7ffffffc)
  464. #   endif
  465. #   ifdef LINUX
  466. #    define OS_TYPE "LINUX"
  467.     extern int etext;
  468. #       define DATASTART ((ptr_t)((((word) (&etext)) + 0xfff) & ~0xfff))
  469. #    define STACKBOTTOM ((ptr_t)0xc0000000)
  470. #   endif
  471. #   ifdef OS2
  472. #    define OS_TYPE "OS2"
  473.              /* STACKBOTTOM and DATASTART are handled specially in     */
  474.         /* os_dep.c. OS2 actually has the right            */
  475.         /* system call!                        */
  476. #   endif
  477. #   ifdef MSWIN32
  478. #    define OS_TYPE "MSWIN32"
  479.         /* STACKBOTTOM and DATASTART are handled specially in     */
  480.         /* os_dep.c.                        */
  481. #   endif
  482. #   ifdef FREEBSD
  483. #    define OS_TYPE "FREEBSD"
  484. #    define MPROTECT_VDB
  485. #   endif
  486. #   ifdef NETBSD
  487. #    define OS_TYPE "NETBSD"
  488. #   endif
  489. #   ifdef THREE86BSD
  490. #    define OS_TYPE "THREE86BSD"
  491. #   endif
  492. #   ifdef BSDI
  493. #    define OS_TYPE "BSDI"
  494. #   endif
  495. #   if defined(FREEBSD) || defined(NETBSD) \
  496.         || defined(THREE86BSD) || defined(BSDI)
  497. #    define HEURISTIC2
  498.     extern char etext;
  499. #    define DATASTART ((ptr_t)(&etext))
  500. #   endif
  501. #   ifdef NEXT
  502. #    define OS_TYPE "NEXT"
  503. #    define DATASTART ((ptr_t) get_etext())
  504. #    define STACKBOTTOM ((ptr_t)0xc0000000)
  505. #   endif
  506. # endif
  507.  
  508. # ifdef NS32K
  509. #   define MACH_TYPE "NS32K"
  510. #   define ALIGNMENT 4
  511.     extern char **environ;
  512. #   define DATASTART ((ptr_t)(&environ))
  513.                   /* hideous kludge: environ is the first   */
  514.                   /* word in crt0.o, and delimits the start */
  515.                   /* of the data segment, no matter which   */
  516.                   /* ld options were passed through.        */
  517. #   define STACKBOTTOM ((ptr_t) 0xfffff000) /* for Encore */
  518. # endif
  519.  
  520. # ifdef MIPS
  521. #   define MACH_TYPE "MIPS"
  522. #   define ALIGNMENT 4    /* Required by hardware    */
  523. #   define DATASTART 0x10000000
  524.                   /* Could probably be slightly higher since */
  525.                   /* startup code allocates lots of junk     */
  526. #   define HEURISTIC2
  527. #   ifdef ULTRIX
  528. #    define OS_TYPE "ULTRIX"
  529. #   endif
  530. #   ifdef RISCOS
  531. #    define OS_TYPE "RISCOS"
  532. #   endif
  533. #   ifdef IRIX5
  534. #    define OS_TYPE "IRIX5"
  535. #    define MPROTECT_VDB
  536.         /* The above is dubious.  Mprotect and signals do work,    */
  537.         /* and dirty bits are implemented under IRIX5.  But,    */
  538.         /* at least under IRIX5.2, mprotect seems to be so    */
  539.         /* slow relative to the hardware that incremental    */
  540.         /* collection is likely to be rarely useful.        */
  541. #    define DYNAMIC_LOADING
  542. #   endif
  543. # endif
  544.  
  545. # ifdef RS6000
  546. #   define MACH_TYPE "RS6000"
  547. #   define ALIGNMENT 4
  548. #   define DATASTART ((ptr_t)0x20000000)
  549. #   define STACKBOTTOM ((ptr_t)0x2ff80000)
  550. # endif
  551.  
  552. # ifdef HP_PA
  553. #   define MACH_TYPE "HP_PA"
  554. #   define ALIGNMENT 4
  555.     extern int __data_start;
  556. #   define DATASTART ((ptr_t)(&__data_start))
  557. #   define HEURISTIC2
  558. #   define STACK_GROWS_UP
  559. # endif
  560.  
  561. # ifdef ALPHA
  562. #   define MACH_TYPE "ALPHA"
  563. #   define ALIGNMENT 8
  564. #   define DATASTART ((ptr_t) 0x140000000)
  565. #   define HEURISTIC2
  566.     /* Normally HEURISTIC2 is too conervative, since        */
  567.     /* the text segment immediately follows the stack.        */
  568.     /* Hence we give an upper pound.                */
  569.     extern __start;
  570. #   define HEURISTIC2_LIMIT ((ptr_t)((word)(&__start) & ~(getpagesize()-1)))
  571. #   define CPP_WORDSZ 64
  572. #   define MPROTECT_VDB
  573. # endif
  574.  
  575. # ifdef M88K
  576. #   define MACH_TYPE "M88K"
  577. #   define ALIGNMENT 4
  578. #   ifdef CX_UX
  579. #       define DATASTART ((((word)&etext + 0x3fffff) & ~0x3fffff) + 0x10000)
  580. #   endif
  581. #   ifdef  DGUX
  582.     extern char * GC_SysVGetDataStart();
  583. #       define DATASTART (ptr_t)GC_SysVGetDataStart(0x10000, &etext)
  584. #   endif
  585. #   define STACKBOTTOM ((char*)0xf0000000) /* determined empirically */
  586. # endif
  587.  
  588. # ifndef STACK_GROWS_UP
  589. #   define STACK_GROWS_DOWN
  590. # endif
  591.  
  592. # ifndef CPP_WORDSZ
  593. #   define CPP_WORDSZ 32
  594. # endif
  595.  
  596. # ifndef OS_TYPE
  597. #   define OS_TYPE ""
  598. # endif
  599.  
  600. # if defined(SUNOS5) || defined(DRSNX)
  601.     /* OS has SVR4 generic features.  Probably others also qualify.    */
  602. #   define SVR4
  603. # endif
  604.  
  605. # if defined(SUNOS5) || defined(DRSNX)
  606.     /* OS has SUNOS5 style semi-undocumented interface to dynamic     */
  607.     /* loader.                                */
  608. #   define SUNOS5DL
  609.     /* OS has SUNOS5 style signal handlers.                */
  610. #   define SUNOS5SIGS
  611. # endif
  612.  
  613. # if CPP_WORDSZ != 32 && CPP_WORDSZ != 64
  614.    -> bad word size
  615. # endif
  616.  
  617. # ifdef PCR
  618. #   undef DYNAMIC_LOADING
  619. #   undef STACKBOTTOM
  620. #   undef HEURISTIC1
  621. #   undef HEURISTIC2
  622. #   undef PROC_VDB
  623. #   undef MPROTECT_VDB
  624. #   define PCR_VDB
  625. # endif
  626.  
  627. # ifdef SRC_M3
  628. /* Postponed for now. */
  629. #   undef PROC_VDB
  630. #   undef MPROTECT_VDB
  631. # endif
  632.  
  633. # ifdef SMALL_CONFIG
  634. /* Presumably not worth the space it takes. */
  635. #   undef PROC_VDB
  636. #   undef MPROTECT_VDB
  637. # endif
  638.  
  639. # if !defined(PCR_VDB) && !defined(PROC_VDB) && !defined(MPROTECT_VDB)
  640. #   define DEFAULT_VDB
  641. # endif
  642.  
  643. # if defined(SPARC)
  644. #   define SAVE_CALL_CHAIN
  645. # endif
  646.  
  647. # endif
  648.